﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace SimpleTaskManager.Domain.Entities
{
    /// <summary>
    /// A class which represents details about a report
    /// </summary>
    public class ReportDetail
    {
        /// <summary>
        /// Id
        /// </summary>
        public int ReportDetailID { get; set; }

        /// <summary>
        /// The original filename of the report
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// The stored report data in a binary form
        /// </summary>
        [MaxLength]
        public byte[] Data { get; set; }

        /// <summary>
        /// The type of the stored file. Eg: text/plain
        /// </summary>
        public string ContentType { get; set; }

        /// <summary>
        /// The reference to the report header
        /// </summary>
        [InverseProperty("Details")]
        public ReportHeader Header { get; set; }
    }
}
